package com.mars.push.core.service.impl;

import com.mars.push.api.dto.MessageSearch;
import com.mars.push.core.channel.PushMessage;
import com.mars.push.core.entity.PushMessageEntity;
import com.mars.push.core.repository.dao.PushMessageDao;
import com.mars.push.core.service.IPushMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author King
 * @create 2020/7/20 17:08
 */
@Service
public class PushMessageServiceImpl implements IPushMessageService {

    @Autowired
    private PushMessageDao pushMessageDao;

    @Override
    public void createPushMessage(PushMessage message) {
        PushMessageEntity entity = new PushMessageEntity();
        pushMessageDao.insert(entity);
    }


    @Override
    public List<PushMessageEntity> listPushMessage(MessageSearch search) {
        return pushMessageDao.listPushMessage(search);
    }
}
